Generic programming with C++ concepts and Haskell type classes—a comparison JEAN-PHIL IPPE BERNARDY and PATRIK JANSSON

نویسنده

  • MARCIN ZALEWSKI
چکیده

Earlier studies have introduced a list of high-level evaluation criteria to assess how well a language supports generic programming. Languages that meet all criteria include Haskell because of its type classes and C++ with the concept feature. We refine these criteria into a taxonomy that captures commonalities and differences between type classes in Haskell and concepts in C++ and discuss which differences are incidental and which ones are due to other language features. The taxonomy allows for an improved understanding of language support for generic programming, and the comparison is useful for the ongoing discussions among language designers and users of both languages.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Generic programming with C++ concepts and Haskell type classes - a comparison

Earlier studies have introduced a list of high-level evaluation criteria to assess how well a language supports generic programming. Languages that meet all criteria include Haskell, because of its type classes, and C++ with the concept feature. We refine these criteria into a taxonomy that captures commonalities and differences between type classes in Haskell and concepts in C++, and discuss w...

متن کامل

Generic Libraries in C++ with Concepts from High-Level Domain Descriptions in Haskell

A class of closely related problems, a problem domain, can often be described by a domain-specific language, which consists of algorithms and combinators useful for solving that particular class of problems. Such a language can be of two kinds: it can form a new language or it can be embedded as a sublanguage in an existing one. We describe an embedded DSL in the form of a library which extends...

متن کامل

Polytypic Programming in Haskell

A polytypic (or generic) program captures a common pattern of computation over di erent datatypes by abstracting over the structure of the datatype. Examples of algorithms that can be de ned polytypically are equality tests, mapping functions and pretty printers. A commonly used technique to implement polytypic programming is specialization, where a specialized version of a polytypic function i...

متن کامل

Prototyping Generic Programming in Template Haskell

Generic Programming deals with the construction of programs that can be applied to many di erent datatypes. This is achieved by parameterizing the generic programs by the structure of the datatypes on which they are to be applied. Programs that can be de ned generically range from simple map functions through pretty printers to complex XML tools. The design space of generic programming language...

متن کامل

Multi-Language Library Development From Haskell Type Classes to C++ Concepts

We define a mapping from generic Haskell specifications to C++ with concepts, a recent extension to C++, that can ultimately be automated. More specifically, we provide a translation from Haskell multiparameter type classes with functional dependencies to ConceptC++. Our translation consists of three major parts: the division of Haskell class variables into ConceptC++ concept parameters and ass...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010